Page({

    data : {
        tempUrls : null
    },

    // 加载
    onLoad(e) {
        // 获取网络图片信息
        wx.getImageInfo({
            src: 'https://cdn.liyanhui.com/girl.jpg',
            success: (result)=>{
                console.log(result)
            },
            fail: ()=>{},
            complete: ()=>{}
        });
    },

    // 触摸
    tapMe(e) {
        // 选择相册或拍照
        wx.chooseImage({
            count: 9,
            sizeType: ['original','compressed'],
            sourceType: ['album','camera'],
            success: (result)=>{
                this.setData({
                    tempUrls : result.tempFiles
                })
            },
            fail: ()=>{},
            complete: ()=>{}
        });

        // 全屏预览图片
        wx.previewImage({
            current: '',
            urls: [
                'https://cdn.liyanhui.com/girl.jpg',
                'https://cdn.liyanhui.com/girl.jpg'
            ],
            success: (result)=>{
                
            },
            fail: ()=>{},
            complete: ()=>{}
        });
    }
})